package org.example.test1.newcontroller;

import org.example.test1.newservice.DeleteService;
import org.example.test1.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin(origins = "*")
@RestController
@RequestMapping("/brand")
public class DeleteController {
    @Autowired
    private DeleteService deleteService;

    @DeleteMapping("/{id}")
    public Result delete(@PathVariable int id){
        deleteService.delete(id);
        return Result.success();
    }
}
